/**
 * Created by oiuyt on 2018/7/18.
 */
import React from 'react';
import {
    //BrowserRouter as Router,
    Route,
    //Link,
    Switch,
    Redirect,
        //Prompt,

} from 'react-router-dom'


//异步导入工具组件
import asyncComponent from '../utils/asyncComponent'

//异步载入组件

const Home = asyncComponent(() => import("../components/home/main"))
const Login = asyncComponent(() => import("../components/login/main"))
const NoMatch = asyncComponent(() => import("../components/common/noMatch"))

const RouterList = () => (
        <Switch>
            <Route path='/' exact render={()=> ( <Redirect to={'/login'}/>)}/>
            <Route path="/login" exact component={Login} />
            <Route path="/home"  component={Home} />
            <Route component={NoMatch}/>
        </Switch>
)

export default RouterList
